package com.sian.security.web.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.Entity;


@XmlRootElement(name="loginForm")
public class Credential  implements Serializable
{
	private static final long serialVersionUID = -6684425679450423985L;

	private Integer id;
	protected String username;
	protected String password;
	private Date createdDate;
	private Integer personId;
	private boolean enabled=true;
	
	@XmlElement(name = "username", required = true)
	@Size(min=1, max=255)
	//@Pattern(regexp="[^'\"]")
	public String getJ_username() {
		return username;
	}
	
	public void setJ_username(String username)
	{
		this.username=username;
	}

	@XmlElement(name = "password", required = true)
	@Size(min=1, max=255)
	public String getJ_password() {
		return password;
	}
	
	public void setJ_password(String password)
	{
		this.password = password;
	}

	@XmlElement(name = "id")
	@Size(min=1, max=15)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@XmlElement(name = "createdData")
	@Size(min=1, max=255)
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@XmlElement(name = "personId")
	@Size(min=1, max=20)
	public Integer getPersonId() {
		return personId;
	}

	public void setPersonId(Integer personId) {
		this.personId = personId;
	}

	@XmlElement(name = "isEnabled")
	@Size(min=1, max=8)
	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	
}

